Generate a random number from 1 to max.
AskActionDefaultAnswerNumber
:
AskActionAllowsNegativeNumbers
:
false
AskActionAllowsDecimalNumbers
:
false
AskActionPrompt
:
🤖 What is the maximum?

Workflow
:
{ "workflowIdentifier": "9C48945F-7E22-4EFA-9334-61777791A46C", "workflowName": "isOnline?", "isSelf": false }

https://www.random.org/clients/http
{ "num": "1", "min": "[6 min]", "max": "[5 max]", "col": "1", "base": "10", "format": "plain", "rnd": "new" }

Input
:
[13 Dictionary]
Workflow
:
{ "workflowIdentifier": "CFFCCE6F-343B-44A0-8F9F-1069BB9EEC6B", "workflowName": "Create Query Item from Dictionary (No Encoding)", "isSelf": false }

ShowHeaders
:
false
https://en.wikipedia.org/wiki/Mersenne_Twister
class MersenneTwister { constructor(seed) { this.N = 624; this.M = 397; this.MATRIX_A = 0x9908b0df; this.UPPER_MASK = 0x80000000; this.LOWER_MASK = 0x7fffffff; this.mt = new Array(this.N); this.mti = this.N + 1; this.init(seed || new Date().getTime()); } init(seed) { this.mt[0] = seed >>> 0; for (this.mti = 1; this.mti < this.N; this.mti++) { const s = this.mt[this.mti - 1] ^ (this.mt[this.mti - 1] >>> 30); this.mt[this.mti] = (((((s & 0xffff0000) >>> 16) * 1812433253) << 16) + (s & 0x0000ffff) * 1812433253) + this.mti; this.mt[this.mti] >>>= 0; } } generate() { let y; const mag01 = [0x0, this.MATRIX_A]; \u{space}\u{space}\u{space}\u{space}\u{space}\u{space}\u{space}\u{space} if (this.mti >= this.N) { let kk; for (kk = 0; kk < this.N - this.M; kk++) { y = (this.mt[kk] & this.UPPER_MASK) | (this.mt[kk + 1] & this.LOWER_MASK); this.mt[kk] = this.mt[kk + this.M] ^ (y >>> 1) ^ mag01[y & 0x1]; } for (; kk < this.N - 1; kk++) { y = (this.mt[kk] & this.UPPER_MASK) | (this.mt[kk + 1] & this.LOWER_MASK); this.mt[kk] = this.mt[kk + (this.M - this.N)] ^ (y >>> 1) ^ mag01[y & 0x1]; } y = (this.mt[this.N - 1] & this.UPPER_MASK) | (this.mt[0] & this.LOWER_MASK); this.mt[this.N - 1] = this.mt[this.M - 1] ^ (y >>> 1) ^ mag01[y & 0x1]; this.mti = 0; } y = this.mt[this.mti++]; y ^= (y >>> 11); y ^= (y << 7) & 0x9d2c5680; y ^= (y << 15) & 0xefc60000; y ^= (y >>> 18); return y >>> 0; } // Scales the generated random number accordingly to fit within the range of 1 to max random(max) { return Math.floor(this.generate() / 0xffffffff * max) + [6 min]; } } const mt = new MersenneTwister(); const randomNumber = mt.random([5 max]); document.write(randomNumber);

Input
:
[18 Text]
Workflow
:
{ "workflowIdentifier": "E2CEB2A0-A1D2-4040-B3D2-804B9C84CAE8", "workflowName": "Run JavaScript Code", "isSelf": false }
Side Note: A simpler alternative is to use the built-in "Random Number" action